package com.andnnl.reflect;

import com.andnnl.map.ABC;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by chenss on 2022/4/25.
 */
public class ReflectTest {
    private static final Logger logger = LoggerFactory.getLogger(ReflectTest.class);
    private static List<String> ignorePackageList = new ArrayList<>(Arrays.asList("com.jiaying.db.Database"
            , "com.jiaying.db.DataTable", "com.jiaying.utils.LogFile", "sun.reflect"));
    public static void main(String[] args) {
        ABC a=new ABC("a1",1,"c1");
        ABC b=new ABC("a2",2,"c2");

//        Field[] fields = ReflectionUtils.getDeclaredFields(ABC.class);

        ignorePackageList.add("asdf");
        System.out.println(ignorePackageList.size());

        Class clazz = InnerContainer.class;
        List<Field> fs = ReflectUtil.getAllFields(clazz);
        System.out.println("fs.size:" + fs.size());
        for (Field f : fs) {

            System.out.println(f);
        }
    }
}
